package com.oly.cms.admin.service;

import java.util.List;

import com.oly.cms.admin.mapper.CmsToolMapper;
import com.oly.cms.query.service.impl.ThemeSearchServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**内容工具 */
@Service
public class CmsToolService {
    @Autowired
    private CmsToolMapper cmsToolMapper;

    @Autowired
    private ThemeSearchServiceImpl themeService;

/**
 * 获取分类
 * @param beginTime
 * @param nodeType
 * @param themeName
 * @return
 */
    public List<String> listCategoryIds(String beginTime, Integer nodeType, String themeName) {

        return cmsToolMapper.listCategoryIds(beginTime, nodeType, themeName);
    }

    /**
     * 获取文章ID
     * @param beginTime
     * @param themeName
     * @return
     */
    public List<String> listArticleIds(String beginTime, String themeName) {
        return cmsToolMapper.listArticleIds(beginTime,
                themeService.selectCmsThemeByWt(themeName).getSupportCategoryId());
    }
}
